vue中引用echarts出现TypeError: Cannot read property 'getAttribute' of undefined 您所在的位置:网站首页 vue echarts getattribute null vue中引用echarts出现TypeError: Cannot read property 'getAttribute' of undefined

vue中引用echarts出现TypeError: Cannot read property 'getAttribute' of undefined

#vue中引用echarts出现TypeError: Cannot read property 'getAttribute' of undefined| 来源: 网络整理| 查看: 265

this.$nextTick(() => { xxx });

解决vue中引用echarts出现"TypeError: Cannot read property 'getAttribute' of undefined"错误。

在调用echarts的位置直接使用上述方法即可,不需要像很多人说的非要在 "mounted"之中调用。

例如(详情可以参考vue官网 https://cn.vuejs.org/v2/api/):

//统计图 statistics (args) { ............ this.dialogVisible = true; //调用echarts的方法 this.$nextTick(()=>{ this.detailStatistics(); }); });

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有